#include <time.h>
#include <stdio.h>

int main(int argc, char const *argv[])
{
    time_t t;
    t = time(NULL);
    struct tm  * p_datatime= localtime(&t);
    printf("%d-%d-%d %d:%d:%d\n",1900+p_datatime->tm_year,1+p_datatime->tm_mon,p_datatime->tm_mday,p_datatime->tm_hour,p_datatime->tm_min,p_datatime->tm_sec);
    return 0;
}
